Data storage technology based on NAND Flash memory has continued to develop quickly over the past ten years. The traditional hard disk drive (HDD) has been replaced in many applications. The main reasons for this include:
High Speed: Data storage in a flash memory is different from the traditional HDD, which depends on the mechanical address operation of the magnetic head. Therefore, the speed of reading and writing data is substantially increased, and the strict requirements regarding data storage through put of applications is met.
Decreasing Price: Due to the progress being made in the field of semiconductor technology, flash memory storage capacity has doubled in less than two years, according to Moore's Law, and the price per storage unit has also decreased. Recently, the price for MLC flash memory has decreased from $10 USD/GB, which was the price five years ago, to less than $1 USD/GB.
Progress Of The Technology Of The Controller: The flash memory needs a matching controller to communicate with the host for storing, reading, and writing data. The mature development of the controller technology has contributed to the solid storage technology based on flash memory so that it can be applied in various corresponding areas, which includes applications for high-end data centers and mobile smartphones.
The flash memory controller is the key portion of the solid state disk (SSD) system. The features and functions of the flash memory controller dictate the features and functions of the SSD, and they are also the substantial difference between the consumer-level SSD and enterprise-level SSD. Due to the need to protect data, the calculation and writing of the Redundant Array of Independent Disks (RAID) is necessary for the enterprise-level SSD.
Due to the higher price of the flash memory, the RAID method such as mirroring (i.e. RAID-1) is not acceptable in an ordinary application environment. RAID 5 is usually utilized in the SSD, which means that n data blocks generate a check block (n>>2). If the data is D0, D1 . . . Dn, the parity check code will be the Exclusive Or (XOR) of the D0, D1 . . . Dn, i.e., P=D0^D1^ . . . ^Dn. The data structure of RAID 5 will be taken as an example in the present invention. It should be noted that the method and the system may also be applied in other RAID structures, such as RAID 6.
A main feature of the flash memory is that it cannot be re-written. A page of data stored in the flash memory could be written with new data only after the whole block where the page exists is erased. This presents a challenge for the flash memory transform level (FTL), but it is an opportunity for RAID. The addition and enlarging of RAID does not exist anymore. The method of implementing RAID dynamically in SSD is illustrated in detail in CN patent application 201210256754.4 of “Dynamic Redundant Array Of Independent Disks (RAID) Storage System And Method On The Basis Of Nonvolatile Memory”.
The data structure of RAID 5 of SSD is illustrated in FIG. 1. The data block D0, D1, D2 and D3 form a RAID data band, and D0, D1, D2 and D3 are operated by XOR to generate the parity check code D4. Usually, D0, D1, D2, D3 and D4 are stored in different flash memory units, i.e., in the Logic Unit Number (LUN), in order to make sure that data can be repaired by the XOR operation when any flash memory LUN fails.
Recently, there have been two main kinds of SSD. One kind of SSD is the consumer-level SSD, without the RAID 5 function. The other kind of SSD is the enterprise-level SSD, which includes the RAID 5 function. The performance of the enterprise-level SSD for the combination of reading and writing is not good enough.
In order to achieve high performance, the utilization of large-scale parallel multi-core multi-thread controllers which are completely customized is necessary for controlling the flash memory. Each LUN could operate parallel and independently. The calculation and writing of RAID 5 include the following considerations: the data transmitted from the host is random, and the instruction transmitted later could be executed earlier; data transmitted from the host is interleaving, transmission of a data block does not finish while another data block has started transmission, and a portion arrives in advance; writing of the parity check code is asynchronous; when the flash memory capable for check apparatus needs writing, the check code is not necessarily prepared, and when the check code is prepared the read-and-write processing unit is not necessarily prepared; the width of RAID 5 (the amount of data block for forming a RAID data band, or the amount of flash memory LUN) is different in accordance with different applications; a read-and-write processing unit could control multiple flash memory chips which may result in the possibility of locking and increase the difficulty of distribution.
The problems solved by the present invention include: how to reduce the performance penalty caused by the calculation of RAID 5 to achieve the high performance of the storage system such as SSD; how to reduce logical area of RAID 5 to meet the downsizing of the control unit of the storage system such as SSD.